﻿CREATE TABLE [dbo].[tbDislocation] (
    [id]                      INT          IDENTITY (1, 1) NOT NULL,
    [InventoryCarriageNumber] nvarchar (8)  NULL,
    [WeightTons]              nvarchar (3)  NULL,
    [DestinationStation_ID]      INT  NOT NULL foreign key references [dbo].[Station] (Station_ID),
    [CargoCodeTariff_ID]         INT  NOT NULL foreign key references [dbo].[Cargo] (Cargo_ID),
    [ConsigneeCode_ID]           INT NOT NULL  foreign key references [dbo].[ShipmentClient] (ShipmentClient_ID),
    [ParkType]                nvarchar (2)  NULL,
    [StartStation_ID]           	 INT  NOT NULL foreign key references [dbo].[Station] (Station_ID),
    [OperationCode_ID]           INT  NOT NULL foreign key references [dbo].[CarOperation] (CarOperation_ID),
    [OperationDate]           nvarchar (4)  NULL,
    [OperationYear]           nvarchar (2)  NULL,
    [OperationTime]           nvarchar (4)  NULL,
    [StationOfOperation_ID]      INT  NOT NULL foreign key references [dbo].[Station] (Station_ID),
    [DeliveryRoad_ID]            INT  NOT NULL foreign key references [dbo].[Road] (Road_ID),
    [ReceiptRoad_ID]             INT  NOT NULL foreign key references [dbo].[Road] (Road_ID),
    [TrainIndex]              nvarchar (13) NULL,
    [TrainNumber]             nvarchar (4)  NULL,
   
);

